package com.spring.shopping.mapper;

import com.spring.shopping.entity.Order;
import com.spring.shopping.entity.OrderItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/*
 * @Coding By ZTK:
 */

public interface OrderMapper {
    void updateOrderStatus(@Param("orderId") Integer orderId,
                           @Param("status") String status);
    void insertOrder(Order order);
    Order selectOrderById(Integer id);

    List<Order> selectOrdersByUserId(@Param("userId") Integer userId,
                                     @Param("offset") int offset,
                                     @Param("size") int size);

    int countOrdersByUserId(@Param("userId") Integer userId);
}